import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_tutorial/app/modules/mine/getview/getview_controller.dart';

class GetViewPage extends GetView<GetViewController> {

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(title: Text('GetViewPage')),

      body: SafeArea(
        child: ListView(
          children: [
            Obx(() => Text(
              controller.count.toString(),
              style: Theme.of(context).textTheme.headline5
            )),
            ElevatedButton(
              onPressed: () {
                controller.increment();
              }, 
              child: Icon(Icons.add)
            )
          ],
        )
      )
    );
  }
}